$('.container').click('on', function() {
    $(this).toggleClass('hover');
});
let vm = new Vue({
    el:"#wp-aside-nav__main",
    data:{
        friendimage:"images/friendimageactive.png",
        dropboximage1:"images/dropbox.png",
        dropboximage2:"images/dropbox.png",
        judge:[false,false,true]
    },
    created:function (){

    },
    methods:{
    }
})




let id3=0;
let id4=1;
let id5=2;
function fn() {
    $(".wp-aside-nav__main-item-img:eq("+id3+")").parent().hover(function () {
        if(!vm.judge[id3]){
            $(this).children(".wp-aside-nav__main-item-img").removeClass("item_image_hover_out")
            $(this).children(".wp-aside-nav__main-item-img").addClass("item_image_hover")
        }
    }, function () {
        $(this).children(".wp-aside-nav__main-item-img").addClass("item_image_hover_out")
        $(this).children(".wp-aside-nav__main-item-img").removeClass("item_image_hover")
    });

    $(".wp-aside-nav__main-item-img:eq("+id4+")").parent().hover(function () {
        if(!vm.judge[id4]){
            $(this).children(".wp-aside-nav__main-item-img").removeClass("item_image_hover_out")
            $(this).children(".wp-aside-nav__main-item-img").addClass("item_image_hover")
        }
    }, function () {
        $(this).children(".wp-aside-nav__main-item-img").addClass("item_image_hover_out")
        $(this).children(".wp-aside-nav__main-item-img").removeClass("item_image_hover")

    });
    $(".wp-aside-nav__main-item-img:eq("+id5+")").parent().hover(function () {
        if(!vm.judge[id5]){
            $(this).children(".wp-aside-nav__main-item-img").removeClass("item_image_hover_out")
            $(this).children(".wp-aside-nav__main-item-img").addClass("item_image_hover")
        }
    }, function () {
        $(this).children(".wp-aside-nav__main-item-img").addClass("item_image_hover_out")
        $(this).children(".wp-aside-nav__main-item-img").removeClass("item_image_hover")

    });
}
fn()
$(".router-link-exact-active").click(function (){
    let id =$(this).children().parents(".router-link-exact-active").index()
    if(!($(this).children(".wp-aside-nav__main-item-img").hasClass("item_image_hover"))){
        if(id==0){
            vm.dropboximage1="images/dropboxactive.png"
            vm.dropboximage2="images/dropbox.png"
            vm.friendimage="images/friendimage.png"
            vm.judge[0]=true
            vm.judge[1]=false
            vm.judge[2]=false
            fn()
        }else if(id==1){
            vm.dropboximage2="images/dropboxactive.png"
            vm.dropboximage1="images/dropbox.png"
            vm.friendimage="images/friendimage.png"
            vm.judge[0]=false
            vm.judge[1]=true
            vm.judge[2]=false
            fn()
        }else{
            vm.friendimage="images/friendimageactive.png"
            vm.dropboximage2="images/dropbox.png"
            vm.dropboximage1="images/dropbox.png"
            vm.judge[0]=false
            vm.judge[1]=false
            vm.judge[2]=true
            fn()
        }
    }
})

